#include "pch.h"
#include "Shadow.h"
#include "LightActor.h"

namespace mini
{

	CShadow::CShadow()
	{

	}

	CShadow::~CShadow()
	{
		SafeDelete(mpMaterialUnit);
	}

	shadowType CShadow::getType() const
	{
		return mType;
	}

	void CShadow::setShader(const std::string& szName)
	{
		CMaterialUnit* pMaterialUnit = new CMaterialUnit;
		pMaterialUnit->setUnitFile(szName);
		pMaterialUnit->onInitialise();
		mpMaterialUnit = pMaterialUnit;
	}

	int CShadow::nPassCount()
	{
		return 0;
	}

	CShaderUnit* CShadow::passBegin(DeviceContext* pContext, int nNumber)
	{
		return nullptr;
	}

	void CShadow::passEnd(DeviceContext* pContext, int nNumber)
	{

	}

	void CShadow::updateMeshMatrix(CShaderUnit* pShaderUnit, CMatrix* pMatrix)
	{

	}

	void CShadow::setLight(CLightActor* pLight)
	{
		mpLightActor = pLight;
	}

}